from models import db


class Event(db.Model):
    __tablename__ = 'event_info'
    __table_args__ = {'mysql_engine': 'InnoDB'}  # 支持事务操作和外键
    ID = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True, unique=True)
    event_type = db.Column(db.String(20))
    event_date = db.Column(db.DateTime)
    event_location = db.Column(db.String(200))
    event_desc = db.Column(db.String(200))
    oldperson_id = db.Column(db.Integer)
    images_path = db.Column(db.String(200))

